﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenESSOConfigurator.BusinessLayer.Atoms;

namespace OpenESSOConfigurator.PresentationLayer.PresentationModels
{
    public class WinApplicationPresentationModel : PresentationModel
    {
        private static WinApplicationPresentationModel instance;
        private WinApplication _winApplication;

        private WinApplicationPresentationModel()
        {
            eventBroker = new OpenESSOConfigurator.PresentationLayer.EventBroker.EventBroker();
            views = new List<IView>();
        }

        public static WinApplicationPresentationModel Instance
        {
            get 
            {
                if (instance == null) instance = new WinApplicationPresentationModel();
                return instance;
            }
        }

        public WinApplication WinApplication
        {
            set 
            {
                _winApplication = value;
                this.UpdateViews();
            }
            get { return _winApplication; }
        }
    }
}
